<script >
export default {
    name: "Aside",
    data() {
        return {
            user: JSON.parse(sessionStorage.getItem("user")),
            activeIndex: '1'
        }
    },
    methods: {
        handleSelect(index) {
            if (index === "1")
                this.$router.push("/main")
            else if (index === "2")
                this.$router.push("/shoppingCenter")
            else if (index === "3")
                this.$router.push("/cart")
            else if (index === "4")
                this.$router.push("/myOrders")
            else if (index === "5")
                this.$router.push("/addBalance")
        }
    }
}
</script>

<template>

    <el-menu default-active=activeIndex @select="handleSelect">

        <el-menu-item index="1">
            <i class="el-icon-menu"></i>首页</el-menu-item>
        <el-menu-item index="2">
            <i class="el-icon-s-goods"></i>购物中心</el-menu-item>
        <el-menu-item index="3">
            <i class="el-icon-shopping-cart-1"></i>购物车</el-menu-item>
        <el-menu-item index="4">
            <i class="el-icon-s-claim"></i>我的历史订单</el-menu-item>
        <el-menu-item index="5">
            <i class="el-icon-s-finance"></i>添加余额</el-menu-item>
    </el-menu>
</template>

<style scoped>

</style>